package com.aiju.base.activity;

import android.os.Bundle;

import com.aiju.bean.User;
import com.aiju.app.config.ConfigManager;
import com.aiju.widgit.dialog.DialogHelper;

/**
 * @author: 佐为
 * @date: 2016-11-10 09:53
 * @version: V1.0
 * @Description: activity 第二层封装（业层），共享登录用户信息，弹出框工具类>
 */
public class BaseActivity extends AbsActivity {

    protected User mUser;

    protected DialogHelper mDialogHelper;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mUser = ConfigManager.getInstance().getUser();
        mDialogHelper = new DialogHelper(this);
    }

    /**
     *
     */
    protected boolean processBackPressed() {
        return false;
    }

    public DialogHelper getDialogHelper() {
        return mDialogHelper;
    }

    @Override
    protected void onDestroy() {
        if(mDialogHelper!=null) {
            mDialogHelper.dismissProgressDialog();
            mDialogHelper = null;
        }
        super.onDestroy();
    }
}
